@extends('admin.app')

@section('content')
    <div class="panel panel-default">
        <div class="panel-heading font-bold">
            修改密码
        </div>
        <div class="panel-body">
            <form enctype="multipart/form-data" class="form-horizontal form-validation"
                  method="post" action="{{ admin_action('Business\UsersController@saveAdminPassword') }}">
                {{ csrf_field() }}
                <label class="text-danger">*这会修改您的密码</label>
                <div class="line line-dashed b-b line-lg"></div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">原密码*</label>
                    <div class="col-lg-4">
                        <input type="password" class="form-control" value="" name="oldPassword" 
                               placeholder="请填写原登陆密码" data-rule-required="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">新密码*</label>
                    <div class="col-lg-4">
                        <input type="password" class="form-control" value="" name="newPassword" id="password" 
                               placeholder="请输入新密码" data-rule-required="true">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-lg-2 control-label">确认新密码*</label>
                    <div class="col-lg-4">
                        <input type="password" class="form-control" value="" name="rPassword" 
                               placeholder="请确认您的新密码" data-rule-required="true" data-rule-equalTo="#password" data-msg-equalTo="您的密码确认不正确">
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg"></div>
                <div class="form-group">
                    <div class="col-lg-4 col-lg-offset-2">
                        <a href="{{ back()->getTargetUrl()}}"
                           class="btn btn-default">返&nbsp;回</a>
                        <button type="submit" class="btn btn-primary">修改密码</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
@endsection 